//imm kinds num,used for imm mux
`define IMM_NUM 5 
//about opcode
`define CAL_I_OPCODE 7'b0010011
`define CAL_R_OPCODE 7'b0110011
`define CAL_W_R_OPCODE 7'b0111011
`define CAL_W_I_OPCODE 7'b0011011
`define LOAD_OPCODE	 7'b0000011
`define B_OPCODE		 7'b1100011
`define STORE_OPCODE 7'b0100011
`define SYS_OPCODE 	 7'b1110011
`define LUI_U_OPCODE 7'b0110111
`define AUIPC_OPCODE 7'b0010111
`define JAL_OPCODE	 7'b1101111
`define JALR_OPCODE	 7'b1100111
`define FENCEI_OPCODE 7'b0001111
 //about funct3
`define ADDI_FUNCT3 3'b000
`define SLTI_FUNCT3	3'b010//new
`define XORI_FUNCT3 3'b100 
`define ORI_FUNCT3 	3'b110//new
`define ANDI_FUNCT3 3'b111 
`define SLTIU_FUNCT3 3'b011 
`define SRAI_FUNCT3 3'b101 
`define SRLI_FUNCT3 3'b101 
`define SLLI_FUNCT3 3'b001
`define JALR_FUNCT3	3'b000
`define LD_FUNCT3		3'b011
`define LW_FUNCT3		3'b010
`define LWU_FUNCT3	3'b110//new
`define LB_FUNCT3		3'b000//new
`define LH_FUNCT3		3'b001
`define LHU_FUNCT3	3'b101
`define SD_FUNCT3   3'b011
`define SW_FUNCT3		3'b010 
`define SH_FUNCT3   3'b001 
`define SB_FUNCT3   3'b000 
`define LBU_FUNCT3	3'b100 
`define BEQ_FUNCT3  3'b000 
`define BNE_FUNCT3  3'b001 
`define BGE_FUNCT3  3'b101
`define BLT_FUNCT3  3'b100
`define BLTU_FUNCT3  3'b110
`define BGEU_FUNCT3  3'b111
`define ADDW_FUNCT3 3'b000
`define SUBW_FUNCT3 3'b000
`define SLLW_FUNCT3 3'b001
`define SRLW_FUNCT3 3'b101
`define SRAW_FUNCT3 3'b101
`define ADDIW_FUNCT3 3'b000
`define SLLIW_FUNCT3 3'b001
`define SRLIW_FUNCT3 3'b101
`define SRAIW_FUNCT3 3'b101
`define ADD_FUNCT3  3'b000
`define SUB_FUNCT3  3'b000
`define AND_FUNCT3	3'b111
`define OR_FUNCT3		3'b110
`define XOR_FUNCT3	3'b100
`define SLL_FUNCT3  3'b001//new
`define SRL_FUNCT3  3'b101//new
`define SRA_FUNCT3  3'b101//new
`define SLTU_FUNCT3 3'b011
`define SLT_FUNCT3	3'b010
`define MUL_FUNCT3  3'b000
`define DIV_FUNCT3  3'b100//new
`define REM_FUNCT3	3'b110//new
`define DIVU_FUNCT3	3'b101
`define REMU_FUNCT3	3'b111
`define MULW_FUNCT3 3'b000
`define DIVW_FUNCT3 3'b100
`define DIVUW_FUNCT3 3'b101//new
`define REMW_FUNCT3 3'b110
`define REMUW_FUNCT3 3'b111
`define CSRRW_FUNCT3 3'b001
`define CSRRS_FUNCT3 3'b010
`define CSRRC_FUNCT3 3'b011
`define CSRRWI_FUNCT3 3'b101
`define CSRRSI_FUNCT3 3'b110
`define CSRRCI_FUNCT3 3'b111
`define FENCEI_FUNCT3 3'b001
`define MULH_FUNCT3 3'b001
`define MULHU_FUNCT3 3'b011
`define MULHSU_FUNCT3 3'b010

//about funct7
`define SLLI_FUNCT6 6'b000000
`define SRAI_FUNCT6 6'b010000
`define SRLI_FUNCT6 6'b000000
`define SLLIW_FUNCT7 7'b0000000
`define SRLIW_FUNCT7 7'b0000000
`define SRAIW_FUNCT7 7'b0100000
`define ADD_FUNCT7  7'b0000000
`define ADDW_FUNCT7 7'b0000000
`define SUBW_FUNCT7 7'b0100000
`define SLLW_FUNCT7 7'b0000000
`define SRLW_FUNCT7 7'b0000000
`define SRAW_FUNCT7 7'b0100000
`define SUB_FUNCT7  7'b0100000
`define SLL_FUNCT7  7'b0000000
`define SRL_FUNCT7  7'b0000000
`define SRA_FUNCT7  7'b0100000
`define AND_FUNCT7	7'b0000000
`define OR_FUNCT7		7'b0000000
`define XOR_FUNCT7	7'b0000000
`define SLTU_FUNCT7	7'b0000000
`define SLT_FUNCT7	7'b0000000
`define MUL_FUNCT7	7'b0000001
`define DIV_FUNCT7	7'b0000001
`define DIVU_FUNCT7	7'b0000001
`define REM_FUNCT7	7'b0000001
`define REMU_FUNCT7	7'b0000001
`define MULW_FUNCT7 7'b0000001
`define DIVW_FUNCT7 7'b0000001
`define DIVUW_FUNCT7 7'b0000001
`define REMW_FUNCT7 7'b0000001
`define REMUW_FUNCT7 7'b0000001
`define MULH_FUNCT7 7'b0000001
`define MULHU_FUNCT7 7'b0000001
`define MULHSU_FUNCT7 7'b0000001

`define ECALL  32'h00000073
`define MRET	 32'h30200073
//alu input A have ? choice
`define A_NUM 4
`define B_NUM 2	
//pc should be update ,it have PC_NUM situations
`define PC_NUM 3 //have 4 choice one is defalut
//data_dst have ? choice
`define RESULT_NUM 2//have 4 choice one is default
//load_date have ? choice
`define LOAD_NUM 7 
//shamt have ? choice , SLLW 5'b SLL 6'b
`define SHAMT_NUM 2
//length of store_mask_o
`define STORE_MASK_LEN	8
//how many choice of store_mask
`define STORE_MASK_NUM  4
//choose writeback data to CSR
`define CSR_KEY_NUM 3
